home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aae.d64
/
crib
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
19KB
|
1,008 lines
10 REM **
20 REM ** CRIBBAGE:
30 REM ** PROGRAMMED BY HERB HASLER
40 REM **
100 DIM FD(6,2),FT(4,3),VD(10,2),VT(10,3)
110 DIM VQ(5,4),PP(7),PS(7),PV(7),VL(5)
120 DIM CP(7),CS(7),CV(7),V2(15,2)
130 DIM SQ(15,4),VX(13),CD$(13),S(15)
140 DEF FNT(X)=(X*(X+1))/2
150 DEF FNB(X)=(X*(X-1))/2
160 DEF FNR(X) =INT(RND(0)*X)+1
170 GOSUB180:GOTO1180
180 B$=" "
190 CN$=""
200 DN$=""
210 O1=0:O2=0
220 D9(1)=2:D9(2)=6:D9(3)=12
230 L$=" ":REM 9 BLANKS
240 RETURN
250 REM *===========================*
260 REM * CHECK DOUBLES FOR 15 IN 4 *
270 REM *===========================*
280 :
290 FORI=1TO6
300 TL=VL(FD(I,1))+VL(FD(I,2))
310 IFTL=15THENSC=SC+2
320 NEXTI
330 RETURN
340 :
350 REM *===========================*
360 REM * CHECK TRIPLES FOR 15 IN 4 *
370 REM *===========================*
380 :
390 FORI=1TO4
400 TL=VL(FT(I,1))+VL(FT(I,2))+VL(FT(I,3))
410 IFTL=15THENSC=SC+2
420 NEXT
430 RETURN
440 :
450 REM *===========================*
460 REM * CHECK DOUBLES FOR 15 IN 5 *
470 REM *===========================*
480 :
490 FORI=1TO10
500 TL=VL(VD(I,1))+VL(VD(I,2))
510 IFTL=15THENSC=SC+2
520 NEXTI
530 RETURN
540 :
550 REM *===========================*
560 REM * CHECK TRIPLES FOR 15 IN 5 *
570 REM *===========================*
580 :
590 FORI=1TO10
600 TL=VL(VT(I,1))+VL(VT(I,2))+VL(VT(I,3))
610 IFTL=15THENSC=SC+2
620 NEXT
630 RETURN
640 :
650 REM *===========================*
660 REM * CHECK QUADS FOR 15 IN 5 *
670 REM *===========================*
680 :
690 FORI=1TO5
700 TL=VL(VQ(I,1))+VL(VQ(I,2))+VL(VQ(I,3))+VL(VQ(I,4))
710 IFTL=15THENSC=SC+2
720 NEXTI
730 RETURN
740 :
750 REM *===========================*
760 REM * CHECK QUADS FOR 15 IN 4 *
770 REM *===========================*
780 :
790 :
800 TL=VL(1)+VL(2)+VL(3)+VL(4)
810 IFTL=15THENSC=SC+2
820 RETURN
830 :
840 REM *===========================*
850 REM * CHECK QUINTS FOR 15 IN 5 *
860 REM *===========================*
870 :
880 :
890 TL=VL(1)+VL(2)+VL(3)+VL(4)+VL(5)
900 IFTL=15THENSC=SC+2
910 RETURN
920 :
930 REM *============================*
940 REM * CHECK FOR RUNS IN 4 *
950 REM *============================*
960 :
970 TL=0
980 FORI=1TO4
990 TL=TL+VP(I)
1000 NEXT I
1010 TT=FNT(VP(4))-FNB(VP(1))
1020 IFTT=TLTHENSC=SC+4:RN=1
1030 RETURN
1040 :
1050 TL=0
1060 FORI=1TO4
1070 TL=0
1080 TL=TL+VP(FT(I,1))+VP(FT(I,2))+VP(FT(I,3))
1090 TT=FNT(VP(FT(I,3)))-FNB(VP(FT(I,1)))
1100 IFTT=TLTHENSC=SC+3
1110 NEXT
1120 RETURN
1130 REM ******************************
1140 REM * *
1150 REM * INITIALIZATION *
1160 REM * *
1170 REM ******************************
1180 FORI=1TO6:FORJ=1TO2
1190 READ FD(I,J)
1200 NEXTJ,I
1210 FORI=1TO4:FORJ=1TO3
1220 READ FT(I,J)
1230 NEXTJ,I
1240 FORI=1TO10:FORJ=1TO2
1250 READ VD(I,J)
1260 NEXTJ,I
1270 FORI=1TO10:FORJ=1TO3
1280 READ VT(I,J)
1290 NEXTJ,I
1300 FORI=1TO5:FORJ=1TO4
1310 READ VQ(I,J)
1320 NEXTJ,I
1330 FORI=1TO15:FORJ=1TO4
1340 READ SQ(I,J)
1350 NEXT J,I
1360 FORI=1TO13:READVX(I):NEXT
1370 FORI=1TO13:READCD$(I):NEXT
1380 FORI=1TO4:READSU$(I):NEXT
1390 FORI=1TO15:FORJ=1TO2
1400 READ V2(I,J)
1410 NEXTJ,I
1420 GOTO6310
1430 REM
1440 REM DATA FOR DIV FROM 4 CARDS
1450 REM
1460 REM
1470 :
1480 REM PAIRS (6)
1490 DATA 1,2, 1,3, 1,4, 2,3, 2,4, 3,4
1500 :
1510 REM TRIPLES (4)
1520 DATA 1,2,3, 1,2,4, 1,3,4, 2,3,4
1530 :
1540 :
1550 REM
1560 REM DATA FOR DIV FROM 5 CARDS
1570 REM
1580 :
1590 REM PAIRS (10)
1600 DATA 1,2, 1,3, 1,4, 1,5, 2,3, 2,4
1610 DATA 2,5, 3,4, 3,5, 4,5
1620 :
1630 REM TRIPLES (10)
1640 DATA 1,2,3, 1,2,4, 1,2,5, 1,3,4
1650 DATA 1,3,5, 1,4,5, 2,3,4, 2,3,5
1660 DATA 2,4,5, 3,4,5
1670 :
1680 REM QUADS (5)
1690 DATA 1,2,3,4, 1,2,3,5, 1,2,4,5
1700 DATA 1,3,4,5, 2,3,4,5
1710 :
1720 REM
1730 REM SPLIT OF 4 FROM 6 (15)
1740 REM
1750 :
1760 DATA 1,2,3,4, 1,2,3,5, 1,2,3,6
1770 DATA 1,2,4,5, 1,2,4,6, 1,2,5,6
1780 DATA 1,3,4,5, 1,3,4,6, 1,3,5,6
1790 DATA 1,4,5,6, 2,3,4,5, 2,3,4,6
1800 DATA 2,3,5,6, 2,4,5,6, 3,4,5,6
1810 DATA 1,2,3,4,5,6,7,8,9,10,10,10,10
1820 DATA A,2,3,4,5,6,7,8,9,T,J,Q,K
1830 DATA "[216]","[211]","[193]","[218]"
1840 :
1850 DATA 5,6, 4,6, 4,5, 3,6, 3,5, 3,4
1860 DATA 2,6, 2,5, 2,4, 2,3, 1,6, 1,5
1870 DATA 1,4, 1,3, 1,2
1880 :
1890 REM *****************************
1900 REM * *
1910 REM * -+- MAIN LINE -+- *
1920 REM * *
1930 REM *****************************
1940 :
1950 :
1960 FORI=1TO4:C0(I)=1:P0(I)=1:NEXT
1970 DECK$="0000000000000000000000000000000000000000000000000000"
1980 FORI=1TO6
1990 GOSUB 2190
2000 PS(I)=NS:PV(I)=NV:PP(I)=NP
2010 NEXTI
2020 FORI=1TO6
2030 GOSUB 2190
2040 CS(I)=NS:CV(I)=NV:CP(I)=NP
2050 NEXTI:PRINT"[147]"
2060 GOSUB2470:GOSUB2600
2070 GOSUB3800
2080 GOSUB4370
2090 GOSUB2190
2100 US=NS:UP=NP:UV=NV
2110 IFUP=11THENONTRGOTO2130,2140
2120 GOTO2150
2130 O2=O2+2:GOSUB8480:GOTO2150
2140 O1=O1+2:GOSUB8480
2150 GOSUB2260:FORI=1TO3000:NEXT
2160 PRINT""
2170 FORI=1TO12:PRINTB$:NEXT
2180 ONTRGOTO9800,9870
2190 NS=FNR(4):NP=FNR(13)
2200 LN=LEN(DECK$)
2210 PO=(NS-1)*13+NP
2220 IFMID$(DECK$,PO,1)="1"THEN2190
2230 DECK$=LEFT$(DECK$,PO-1)+"1"+RIGHT$(DECK$,LN-PO)
2240 NV=VX(NP)
2250 RETURN
2260 :
2270 PRINT""
2280 FORI=1TO12:PRINTB$:NEXTI
2290 PR=UP:C$=MID$("[151][150][151][150]",US,1)
2300 ST$=MID$(DN$,1,12)
2310 SS$=SU$(US)
2320 P1$=CD$(PR)
2330 TB=15
2340 GOSUB2860
2350 PRINTC$
2360 GOSUB2970
2370 PRINT"";CN$;"[154]UP CARD"
2380 RETURN
2390 :
2400 PRINT"(UP TO 10 LETTERS)[145][145]"
2410 INPUT"PLEASE ENTER YOUR NAME";N$:N$=LEFT$(N$,10)
2420 PRINT"DO YOU WANT TO DEAL FIRST "N$"
2430 [133]"TYPE Y OR N";G$:PB[178]20
2440 [139]G$[178]"Y"[167][153]B$:[153]"ONOK.":TR[178]1:[142]
2450 [139]G$[178]"N"[167][153]B$:[153]"ONOK, I'LL DEAL.":[153]B$:[153]B$:TR[178]2:[142]
2460 [153]"TYPE Y(YES) OR N(NO) ONONONONONONON":G$[178]"":[137]2420
2470 [129]I[178]1[164]6
2480 [129]J[178]1[164]5
2490 [139]PP(J)[177]PP(J[170]1)[167][141]2520
2500 [130]J,I
2510 [142]
2520 K[178]PP(J[170]1):L[178]PV(J[170]1):M[178]PS(J[170]1)
2530 PP(J[170]1)[178]PP(J)
2540 PS(J[170]1)[178]PS(J)
2550 PV(J[170]1)[178]PV(J)
2560 PP(J)[178]K
2570 PS(J)[178]M
2580 PV(J)[178]L
2590 [142]
2600 [129]I[178]1[164]6
2610 [129]J[178]1[164]5
2620 [139]CP(J)[177]CP(J[170]1)[167][141]2650
2630 [130]J,I
2640 [142]
2650 K[178]CP(J[170]1):L[178]CV(J[170]1):M[178]CS(J[170]1)
2660 CP(J[170]1)[178]CP(J)
2670 CS(J[170]1)[178]CS(J)
2680 CV(J[170]1)[178]CV(J)
2690 CP(J)[178]K
2700 CS(J)[178]M
2710 CV(J)[178]L
2720 [142]
2730 [129]I[178]1[164]5
2740 [129]J[178]1[164]4
2750 [139]VP(J)[177]VP(J[170]1)[167][141]2780
2760 [130]J,I
2770 [142]
2780 K[178]VP(J[170]1):L[178]VV(J[170]1):M[178]VS(J[170]1)
2790 VP(J[170]1)[178]VP(J)
2800 VS(J[170]1)[178]VS(J)
2810 VV(J[170]1)[178]VV(J)
2820 VP(J)[178]K
2830 VS(J)[178]M
2840 VV(J)[178]L
2850 [142]
2860 CD$[178]"(null) (null)"
2870 [153]ST$;:[153][163]TB)"CONT(null)TANTANTANTANTANTANTANRIGHT$"
2880 [153][163]TB)"(null)"C$;P1$"CONT(null)"
2890 [153][163]TB)"(null)"C$;SS$"CONT(null)"
2900 [153][163]TB)CD$
2910 [153][163]TB)CD$
2920 [153][163]TB)CD$
2930 [153][163]TB)"(null) "C$;SS$"CONT(null)"
2940 [153][163]TB)"(null) "C$;P1$"CONT(null)"
2950 [153][163]TB)"MID$TANTANTANTANTANTANTAN(null)"
2960 [142]
2970 [145]PR[137]2980,3050,3090,3140,3180,3230,3280,3340,3410,3480,3560,3640,3720
2980 [153]ST$""
2990 [153][163]TB)"A"
3000 [153][163]TB)"CCC"
3010 [153][163]TB)"E E E"
3020 [153][163]TB)"CCC"
3030 [153][163]TB)"A"
3040 [142]
3050 [153]ST$""
3060 [153][163]TB)""SS$
3070 [153]"":[153][163]TB)""SS$
3080 [142]
3090 [153]ST$""
3100 [153][163]TB)""SS$""
3110 [153][163]TB)""SS$""
3120 [153][163]TB)""SS$
3130 [142]
3140 [153]ST$""
3150 [153][163]TB)""SS$""SS$""
3160 [153][163]TB)""SS$""SS$
3170 [142]
3180 [153]ST$""
3190 [153][163]TB)""SS$""SS$""
3200 [153][163]TB)""SS$""
3210 [153][163]TB)""SS$""SS$
3220 [142]
3230 [153]ST$""
3240 [153][163]TB)""SS$""SS$""
3250 [153][163]TB)""SS$""SS$""
3260 [153][163]TB)""SS$""SS$
3270 [142]
3280 [153]ST$""
3290 [153][163]TB)""SS$""SS$
3300 [153][163]TB)""SS$
3310 [153][163]TB)""SS$""SS$""
3320 [153][163]TB)""SS$""SS$
3330 [142]
3340 [153]ST$""
3350 [153][163]TB)""SS$""SS$
3360 [153][163]TB)""SS$
3370 [153][163]TB)""SS$""SS$
3380 [153][163]TB)""SS$
3390 [153][163]TB)""SS$""SS$
3400 [142]
3410 [153]ST$
3420 [153][163]TB)""SS$""SS$
3430 [153][163]TB)""SS$
3440 [153][163]TB)""SS$""SS$""
3450 [153][163]TB)""SS$""SS$""
3460 [153][163]TB)""SS$""SS$
3470 [142]
3480 [153]ST$
3490 [153][163]TB)""SS$""SS$
3500 [153][163]TB)""SS$
3510 [153][163]TB)""SS$""SS$""
3520 [153][163]TB)""SS$""SS$
3530 [153][163]TB)""SS$
3540 [153][163]TB)""SS$""SS$
3550 [142]
3560 TB[178]TB[170]2:[153]ST$:[153][163]TB)"(null)TAB(TAB(TAB((null)"
3570 [153][163]TB)"FNFNJ THEN"
3580 [153][163]TB)"FNFNA THEN"
3590 [153][163]TB)"SGN C THEN"
3600 [153][163]TB)"FN KTHENTHEN"
3610 [153][163]TB)"FN"SS$"THENTHEN"
3620 [153][163]TB)"(null)TOTOTOSQR"
3630 [142]
3640 TB[178]TB[170]2:[153]ST$:[153][163]TB)"(null)TAB(TAB(TAB((null)"
3650 [153][163]TB)"FNFNQ THEN"
3660 [153][163]TB)"FNFNU THEN"
3670 [153][163]TB)"SGN E THEN"
3680 [153][163]TB)"FN ETHENTHEN"
3690 [153][163]TB)"FN NTHENTHEN"
3700 [153][163]TB)"(null)TOTOTOSQR"
3710 [142]
3720 TB[178]TB[170]2:[153]ST$:[153][163]TB)"(null)TAB(TAB(TAB((null)"
3730 [153][163]TB)"FNFNK THEN"
3740 [153][163]TB)"FNFNI THEN"
3750 [153][163]TB)"SGN N THEN"
3760 [153][163]TB)"FN GTHENTHEN"
3770 [153][163]TB)"FN"SS$"THENTHEN"
3780 [153][163]TB)"(null)TOTOTOSQR"
3790 [142]
3800 [129]I[178]1[164]4
3810 PR[178]PP(I):C$[178][202]("POKEDEFPOKEDEF",PS(I),1)
3820 ST$[178]""
3830 SS$[178]SU$(PS(I))
3840 P1$[178]CD$(PR)
3850 TB[178](I[171]1)[172]9[170]2:[141]2860
3860 [153]C$:[141]2970:[130]
3870 [153]"CONT1234"
3880 [129]I[178]5[164]6
3890 PR[178]PP(I):C$[178][202]("POKEDEFPOKEDEF",PS(I),1)
3900 ST$[178]""
3910 SS$[178]SU$(PS(I))
3920 P1$[178]CD$(PR)
3930 TB[178](I[171]5)[172]15[170]7
3940 [141]2860
3950 [153]C$
3960 [141]2970
3970 [130]
3980 [153]"CONT56":[141]8480
3990 [153][202](DN$,1,22)"> PLEASE CHOOSE TWO CARDS TO BE PUT IN"
4000 [133]"THE CRIB (#,#)";A,B
4010 [139]A[179]1[176]A[177]6[167][153]"ONONONON":[137]3990
4020 [139]B[179]1[176]B[177]6[167][153]"ONONONON":[137]3990
4030 [139] A[178]B [167][153]"ONONONON":[137]3990
4040 [139]B[179]A[167]I[178]A:A[178]B:B[178]I
4050 PI[178]0
4060 [129]I[178]1[164]15
4070 [139]A[178]V2(I,1)[175]B[178]V2(I,2)[167]PI[178]I:I[178]15
4080 [130]I
4090 [139]PI[178]0[167][153]"ERROR":[128]
4100 [129]I[178]1[164]4
4110 TP(I)[178]PP(SQ(PI,I))
4120 TS(I)[178]PS(SQ(PI,I))
4130 TV(I)[178]PV(SQ(PI,I))
4140 [130]I
4150 RP(1)[178]PP(V2(PI,1))
4160 RS(1)[178]PS(V2(PI,1))
4170 RV(1)[178]PV(V2(PI,1))
4180 RV(2)[178]PV(V2(PI,2))
4190 RS(2)[178]PS(V2(PI,2))
4200 RP(2)[178]PP(V2(PI,2))
4210 [129]I[178]1[164]4
4220 PP(I)[178]TP(I)
4230 PS(I)[178]TS(I)
4240 PV(I)[178]TV(I)
4250 [130]I:[153]"LOAD";
4260 [129]I[178]1[164]4
4270 PR[178]PP(I):C$[178][202]("POKEDEFPOKEDEF",PS(I),1)
4280 ST$[178]""
4290 SS$[178]SU$(PS(I))
4300 P1$[178]CD$(PR)
4310 TB[178](I[171]1)[172]9[170]2:[141]2860
4320 [153]C$:[141]2970:[130]
4330 [153]"CONT1234"
4340 [153]"I'M STILL DECIDING..."
4350 [142]
4360 [146]198,1:[128]
4370 [141]8480
4380 [129]K[178]1[164]15
4390 [129]L[178]1[164]4
4400 VL(L)[178]CV(SQ(K,L))
4410 VP(L)[178]CP(SQ(K,L))
4420 [130]L
4430 SC[178]0
4440 [141]250
4450 [141]350
4460 [141]750
4470 RN[178]0
4480 [141]930
4490 [139]RN[178]1[167]4510
4500 [141]1050
4510 [141]4760
4520 [141]4920
4530 S(K)[178]SC
4540 [130]K:H[178][171]1:PI[178]0
4550 [129]I[178]1[164]15
4560 [139]S(I)[177]H[167]H[178]S(I):PI[178]I
4570 [130]I
4580 [139]PI[178]0[167][153]"***ERROR: LINE IS 9250":[128]
4590 [129]I[178]1[164]4
4600 TP(I)[178]CP(SQ(PI,I))
4610 TS(I)[178]CS(SQ(PI,I))
4620 TV(I)[178]CV(SQ(PI,I))
4630 [130]I
4640 RP(3)[178]CP(V2(PI,1))
4650 RS(3)[178]CS(V2(PI,1))
4660 RV(3)[178]CV(V2(PI,1))
4670 RV(4)[178]CV(V2(PI,2))
4680 RS(4)[178]CS(V2(PI,2))
4690 RP(4)[178]CP(V2(PI,2))
4700 [129]I[178]1[164]4
4710 CP(I)[178]TP(I)
4720 CS(I)[178]TS(I)
4730 CV(I)[178]TV(I)
4740 [130]I
4750 [142]
4760 [143]
4770 [143] FIND 4/3/2 OF A KIND FROM 4
4780 [143]
4790 :
4800 PI[178]0
4810 [139]VP(1)[178]VP(2)[175]VP(1)[178]VP(3)[175]VP(1)[178]VP(4)[167]SC[178]SC[170]12:[142]
4820 [129]I[178]1[164]4
4830 [139]VP(FT(I,1))[178]VP(FT(I,2))[175]VP(FT(I,1))[178]VP(FT(I,3))[167]SC[178]SC[170]6:I[178]4:PI[178]1
4840 [130]I
4850 [139]PI[178]1[167][142]
4860 [129]I[178]1[164]6
4870 [139]VP(FD(I,1))[178]VP(FD(I,2))[167]SC[178]SC[170]2:PI[178]I:I[178]6
4880 [130]I
4890 [139]FD(PI,1)[179][177]1[175]FD(PI,2)[179][177]2[167][142]
4900 [139]VP(3)[178]VP(4)[167]SC[178]SC[170]2
4910 [142]
4920 [139]CS(1)[179][177]CS(2)[167][142]
4930 [139]CS(1)[179][177]CS(3)[167][142]
4940 [139]CS(1)[179][177]CS(4)[167][142]
4950 SC[178]SC[170]4:[142]
4960 [143] *===========================*
4970 [143] * CHECK 4/3/2 OF A KIND IN5 *
4980 [143] *===========================*
4990 :
5000 PI[178]0
5010 [129]I[178]1[164]5
5020 [139]VP(VQ(I,1))[179][177]VP(VQ(I,2))[167]5060
5030 [139]VP(VQ(I,1))[179][177]VP(VQ(I,3))[167]5060
5040 [139]VP(VQ(I,1))[179][177]VP(VQ(I,4))[167]5060
5050 SC[178]SC[170]12:PI[178]1:I[178]5
5060 [130]
5070 [139]PI[178]1[167][142]
5080 :
5090 P9[178]0
5100 [129]I[178]1[164]10
5110 [139]VP(VT(I,1))[179][177]VP(VT(I,2))[167]5140
5120 [139]VP(VT(I,1))[179][177]VP(VT(I,3))[167]5140
5130 SC[178]SC[170]6:P9[178]VP(VT(I,1)):I[178]10
5140 [130]
5150 :
5160 [139]P9[179][177]0[167]5230
5170 [129]I[178]1[164]10
5180 [139]VP(VD(I,1))[179][177]VP(VD(I,2))[167]5200
5190 SC[178]SC[170]2:P9[178]VP(VD(I,1)):I[178]10
5200 [130]
5210 [139]P9[178]0[167][142]
5220 :
5230 [129]I[178]1[164]10
5240 [139]VP(VD(I,1))[179][177]VP(VD(I,2))[167]5270
5250 [139]VP(VD(I,1))[178]P9[167]5270
5260 SC[178]SC[170]2:I[178]10
5270 [130]
5280 [142]
5290 [143]
5300 [143] CHECK FOR FLUSH IN CRIB
5310 [143]
5320 :
5330 [139]RS(1)[179][177]RS(2)[167][142]
5340 [139]RS(1)[179][177]RS(3)[167][142]
5350 [139]RS(1)[179][177]RS(4)[167][142]
5360 [139]RS(4)[178]RS(5)[167]SC[178]SC[170]5
5370 [142]
5380 [143]
5390 [143] CHECK FOR FLUSH IN 5
5400 [143]
5410 :
5420 [139]CS(1)[179][177]CS(2)[167][142]
5430 [139]CS(1)[179][177]CS(3)[167][142]
5440 [139]CS(1)[179][177]CS(4)[167][142]
5450 SC[178]SC[170]4
5460 [139]CS(4)[178]CS(5)[167]SC[178]SC[170]1
5470 [142]
5480 [143]
5490 [143] CHECK FOR FLUSH IN 5
5500 [143]
5510 :
5520 [139]PS(1)[179][177]PS(2)[167][142]
5530 [139]PS(1)[179][177]PS(3)[167][142]
5540 [139]PS(1)[179][177]PS(4)[167][142]
5550 SC[178]SC[170]4
5560 [139]PS(4)[178]PS(5)[167]SC[178]SC[170]1
5570 [142]
5580 :
5590 [129]I[178]1[164]4
5600 [139]CP(I)[178]11[175]CS(I)[178]US[167]SC[178]SC[170]1:I[178]4
5610 [130]
5620 [142]
5630 [129]I[178]1[164]4
5640 [139]PP(I)[178]11[175]PS(I)[178]US[167]SC[178]SC[170]1:I[178]4
5650 [130]
5660 [142]
5670 [129]I[178]1[164]4
5680 [139]RP(I)[178]11[175]RS(I)[178]US[167]SC[178]SC[170]1:I[178]4
5690 [130]
5700 [142]
5710 :
5720 [143] *===========================*
5730 [143] * CHECK FOR RUNS IN 5 *
5740 [143] *===========================*
5750 :
5760 TL[178]0
5770 [129]I[178]1[164]5
5780 TL[178]TL[170]VP(I)
5790 [130]I
5800 TT[178][165]T(VP(5))[171][165]B(VP(1))
5810 [139]TT[178]TL[167]SC[178]SC[170]5:RN[178]1
5820 [142]
5830 :
5840 TL[178]0
5850 [129]I[178]1[164]5
5860 TL[178]0
5870 TL[178]TL[170]VP(VQ(I,1))[170]VP(VQ(I,2))[170]VP(VQ(I,3))[170]VP(VQ(I,4))
5880 TT[178][165]T(VP(VQ(I,4)))[171][165]B(VP(VQ(I,1)))
5890 [139]TT[178]TL[167]SC[178]SC[170]4:RN[178]1
5900 [130]
5910 [142]
5920 :
5930 TL[178]0
5940 [129]I[178]1[164]10
5950 TL[178]0
5960 TL[178]TL[170]VP(VT(I,1))[170]VP(VT(I,2))[170]VP(VT(I,3))
5970 TT[178][165]T(VP(VT(I,3)))[171][165]B(VP(VT(I,1)))
5980 [139]TT[178]TL[167]SC[178]SC[170]3
5990 [130]
6000 [142]
6010 :
6020 [143]
6030 [143] DISPLAY COMP HAND FOR COUNT
6040 [143]
6050 :
6060 [153]"LOAD"[163]16)"MY HAND"
6070 [129]I[178]1[164]4
6080 PR[178]CP(I):C$[178][202]("POKEDEFPOKEDEF",CS(I),1)
6090 ST$[178]""
6100 SS$[178]SU$(CS(I))
6110 P1$[178]CD$(PR)
6120 TB[178](I[171]1)[172]9[170]2:[141]2860
6130 [153]C$:[141]2970:[130]
6140 [141]2260
6150 [142]
6160 [143]
6170 [143] DISPLAY PLAYER HAND FOR COUNT
6180 [143]
6190 :
6200 [153]"LOAD"[163]15)"YOUR HAND"
6210 [129]I[178]1[164]4
6220 PR[178]PP(I):C$[178][202]("POKEDEFPOKEDEF",PS(I),1)
6230 ST$[178]""
6240 SS$[178]SU$(PS(I))
6250 P1$[178]CD$(PR)
6260 TB[178](I[171]1)[172]9[170]2:[141]2860
6270 [153]C$:[141]2970:[130]
6280 [141]2260
6290 [142]
6300 :
6310 [143] *==========================*
6320 [143] * INTRODUCTION! *
6330 [143] *==========================*
6340 :
6350 [151]53281,15:[151]53280,6
6360 [153]"LOAD"
6370 [153]" (null)TANTANTANTANTANTANTANRIGHT$(null)TANTANTANTANTANTANTANRIGHT$(null)TANTANTANTANTANTANTANRIGHT$(null)TANTANTANTANTANTANTANRIGHT$"
6380 [153]" (null) (null)(null) (null)(null) (null)(null) (null)"
6390 [153]" (null) (null)TANTANTANTANTAN(null)(null) (null)TANTANTANRIGHT$ (null)MID$TANTANRIGHT$CLOSE(null)TANTAN(null)(null) (null)TANTANTANRIGHT$ (null)"
6400 [153]" (null) (null) (null) MID$TANTANTAN(null) (null) (null) (null) (null) MID$TANTANTAN(null) (null)"
6410 [153]" (null) (null) (null) (null) (null) (null) (null) (null)"
6420 [153]" (null) (null) (null) (null)TANTANTANTANTAN(null) (null) (null) (null) (null)TAN(null)"
6430 [153]" (null) (null) (null) MID$TANRIGHT$ (null) (null) (null) MID$TANRIGHT$"
6440 [153]" (null) (null) (null) (null)RIGHT$MID$TANRIGHT$ (null) (null) (null) (null)"
6450 [153]" (null) (null) (null) (null)MID$TANRIGHT$(null) (null) (null) (null) (null)TANTANTANRIGHT$ (null)"
6460 [153]" (null) MID$TANTANTANTANTANRIGHT$(null) (null) (null)MID$TANRIGHT$(null)TANTAN(null) MID$TANTANRIGHT$(null) MID$TANTANTAN(null) (null)"
6470 [153]" (null) (null)(null) (null) MID$RIGHT$ (null)(null) (null)(null) (null)"
6480 [153]" MID$TANTANTANTANTANTANTAN(null)MID$TAN(null) MID$TAN(null)MID$TANTANTANTANTANTANTAN(null)MID$TANTANTANTANTANTANTAN(null)"
6490 [153]"CONT (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$"
6500 [153]" (null) DEFCRIBBAGE: PROGRAMED BY H. HASLER CONT(null)
6510 PRINT" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
6520 PRINT" [221] TYPE: [221]"
6530 PRINT" [221] <F1> FOR INSTRUCTIONS [221]"
6540 PRINT" [221] <F3> TO START GAME [221]"
6550 PRINT" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
6560 POKE198,0
6570 WAIT198,1
6580 GETG$
6590 IFG$="[133]"THEN9390
6600 IFG$="[134]"THENPRINT"[147]":GOSUB2390:GOTO1890
6610 PRINT"[145]"B$
6620 PRINT"[145]INVALID OPTION PLEASE TRY AGAIN.":GOTO6560
6630 :
6640 REM
6650 REM DISPLAY CRIB
6660 REM
6670 :
6680 IFTR=1THENPRINT"[147]"TAB(15)"YOUR CRIB":GOTO6700
6690 PRINT"[147]"TAB(16)"MY CRIB"
6700 SC=0
6710 FORI=1TO4
6720 PR=RP(I):C$=MID$("[151][150][151][150]",RS(I),1)
6730 ST$=""
6740 SS$=SU$(RS(I))
6750 P1$=CD$(PR)
6760 TB=(I-1)*9+2:GOSUB2860
6770 PRINTC$:GOSUB2970:NEXT
6780 GOSUB2260
6790 SC=0:GOSUB8480
6800 RP(5)=UP:RS(5)=US:RV(5)=UV
6810 FORI=1TO5
6820 VP(I)=RP(I)
6830 VS(I)=RS(I)
6840 VL(I)=RV(I)
6850 NEXT
6860 GOSUB2730
6870 GOSUB450
6880 GOSUB550
6890 GOSUB650
6900 GOSUB840
6910 RN=0
6920 GOSUB5720
6930 IFRN=1THEN6970
6940 GOSUB5840
6950 IFRN=1THEN6970
6960 GOSUB5930
6970 GOSUB4960
6980 GOSUB5290
6990 GOSUB5670
7000 PRINTMID$(DN$,1,22)"WICH IS WORTH"SC"POINTS
7010 [145]TR[137]7020,7050
7020 TR[178]2:O2[178]O2[170]SC
7030 [151]198,0:[146]198,1:[161]G$
7040 [137]1890
7050 TR[178]1:O1[178]O1[170]SC
7060 [151]198,0:[146]198,1:[161]G$:[153]"LOAD"
7070 [137]1890
7080 :
7090 [143] *==========================*
7100 [143] * -+- MY LEAD -+- *
7110 [143] *==========================*
7120 :
7130 N5[178]0
7140 [129]I[178]1[164]4
7150 [139]CV(I)[179][177]5[175]C0(I)[178]1[167]N5[178]1
7160 [130]
7170 CZ[178][165]R(4)
7180 [139]N5[178]0[175]CV(CZ)[178]5[167]7170
7190 CN[178]CV(CZ)
7200 [153]CN$"";CN
7210 C0(CZ)[178]0
7220 CB[178]0
7230 LP[178]CP(CZ)
7240 [142]
7250 :
7260 :
7270 :
7280 :
7290 :
7300 :
7310 :
7320 CZ[178]0:DD[178]0
7330 [129]I[178]1[164]4
7340 [139]C0(I)[178]0[167]7380
7350 [139](CV(I)[170]CN[178]15[176]CV(I)[170]CN[178]31)[175]C0(I)[178]1[167]CZ[178]I:O1[178]O1[170]2
7360 [139]CP(I)[178]LP[175]C0(I)[178]1[167]CZ[178]I:I[178]4:L0[178]L0[170]1:O1[178]O1[170]D9(L0):DD[178]1
7370 [139]CZ[179][177]0[167]I[178]4
7380 [130]
7390 [139]DD[178]0[167]L0[178]0
7400 [139]CZ[178]0[167][141]9730
7410 C0(CZ)[178]0
7420 CN[178]CN[170]CV(CZ)
7430 LP[178]CP(CZ)
7440 [153]CN$""CN
7450 MY[178]1
7460 [142]
7470 :
7480 [139]CZ[178]0[167][142]
7490 PR[178]CP(CZ):C$[178][202]("POKEDEFPOKEDEF",CS(CZ),1)
7500 ST$[178][202](DN$,1,14)
7510 SS$[178]SU$(CS(CZ))
7520 P1$[178]CD$((PR))
7530 CB[178]CB[170]2
7540 TB[178]CB:[141]8430
7550 [141]2860
7560 [153]C$
7570 [141]2970
7580 [142]
7590 :
7600 :
7610 [153][202](DN$,1,13)"WICH CARD."
7620 [151]198,0
7630 [146]198,1
7640 [161]G$
7650 [139]G$[179]"1"[176]G$[177]"4"[167]7620
7660 PZ[178][197](G$)
7670 [139]P0(PZ)[178]0[167][141]7870:[137]7620
7680 [139] CN[170]PV(PZ)[177]31[167][153][202](DN$,1,23)"TOTAL CAN'T EXCEED 31":[137]7620
7690 CN[178]CN[170]PV(PZ):P0(PZ)[178]0
7700 [153]CN$""CN
7710 [141]8010
7720 [141]8120
7730 MY[178]2
7740 [142]
7750 :
7760 PR[178]PP(PZ):C$[178][202]("POKEDEFPOKEDEF",PS(PZ),1)
7770 ST$[178][202](DN$,1,14)
7780 SS$[178]SU$(PS(PZ))
7790 P1$[178]CD$((PR))
7800 PB[178]PB[170]2
7810 TB[178]PB:[141]8430
7820 [141]2860
7830 [153]C$
7840 [141]2970
7850 [153][202](DN$,1,13)B$
7860 [142]
7870 [153][202](DN$,1,13)B$:[129]I[178]1[164]100:[130]
7880 [153][202](DN$,1,13)"THAT CARD IS GONE, WHICH CARD."
7890 :
7900 [143]
7910 [143] CHECK IF PLAYER CAN PLAY
7920 [143]
7930 :
7940 PL[178]0
7950 [129]I[178]1[164]4
7960 [139] P0(I)[178]0[167]7980
7970 [139]CN[170]PV(I)[179]32[167]PL[178]I
7980 [130]
7990 [142]
8000 :
8010 [143]
8020 [143] CALC PLAYER PEG POINTS
8030 [143]
8040 :
8050 [139]CN[178]15[167]O2[178]O2[170]2
8060 [139]CN[178]31[167]O2[178]O2[170]2
8070 DD[178]0
8080 [139]PP(PZ)[178]LP[167]L0[178]L0[170]1:DD[178]1:O2[178]O2[170]D9(L0)
8090 [139]DD[178]0[167]L0[178]0
8100 LP[178]PP(PZ)
8110 [142]
8120 TB[178](PZ[171]1)[172]9[170]2:[153]""
8130 [129]I[178]1[164]9
8140 [153][163]TB)L$
8150 [130]
8160 [142]
8170 [143]
8180 [143] NO-ONE CAN PLAY
8190 [143]
8200 :
8210 CB[178]0:PB[178]22
8220 [153][202](DN$,1,13)
8230 [129]I[178]1[164]10
8240 [153]B$
8250 [130]
8260 [145]MY[137]8280,8350
8270 [153]"***ERROR: LINE IS 40050"
8280 O1[178]O1[170]1:[141]8480
8290 CN[178]0:[141]7900
8300 [141]9630
8310 [139]PI[178]0[175]PL[178]0[167]8600
8320 [139]PI[178]0[167][137]10040
8330 [139]PL[178]0[167][137]9950
8340 [137]9890
8350 O2[178]O2[170]1:[141]8480
8360 CN[178]0:[141]7900
8370 [141]9630
8380 [139]PI[178]0[175]PL[178]0[167]8600
8390 [139]PI[178]0[167][137]10040
8400 [139]PL[178]0[167][137]9950
8410 [141]7090:[141]7470:[141]8480
8420 [137]9890
8430 [153][202](DN$,1,13)
8440 [129]I[178]1[164]9
8450 [153][163]TB) L$
8460 [130]
8470 [142]
8480 [153]"CONT SID:";O1;[163]20)" "N$":";O2
8490 [139]O1[177]120[167]8520
8500 [139]O2[177]120[167][153]"LOADYOU JUST BARELY WON"O2"TO"O1:[137]8550
8510 [142]
8520 [153]"LOADI BEAT YOU"O1"TO"O2
8530 [139]O2[179]60[167][153]"AND THATS A DOUBLE SKUNK..."
8540 [139]O2[179]90[167][153]"AND THATS A SKUNK..."
8550 [153]"DO YOU WANT TO PLAY AGAIN "N$"
8560 INPUT"TYPE Y OR N";G$
8570 IFG$="Y"THENPRINTB$:PRINT"[145]OK.":CLR:GOSUB170:GOSUB2420:GOTO1890
8580 IFG$="N"THENPRINTB$:PRINT"[145]OK, CHICKEN, SEE YOU IN THE FUNNIES!!!":END
8590 PRINT"TYPE Y(YES) OR N(NO) [145][145][145][145][145][145][145]":G$="":GOTO8550
8600 REM
8610 REM HAND FINISHED
8620 REM
8630 :
8640 ONTRGOTO8650,8970
8650 GOSUB6020
8660 SC=0:GOSUB8480
8670 CP(5)=UP:CS(5)=US:CV(5)=UV
8680 FORI=1TO5
8690 VP(I)=CP(I)
8700 VS(I)=CS(I)
8710 VL(I)=CV(I)
8720 NEXT
8730 GOSUB2730
8740 GOSUB450
8750 GOSUB550
8760 GOSUB650
8770 GOSUB840
8780 RN=0
8790 GOSUB5720
8800 IFRN=1THEN8840
8810 GOSUB5840
8820 IFRN=1THEN8840
8830 GOSUB5930
8840 GOSUB4960
8850 GOSUB5380
8860 GOSUB5590:O1=O1+SC
8870 PRINTMID$(DN$,1,22)"WHICH IS WORTH"SC"POINTS
8880 [139]SC[177]14[175]O1[177]O2[175]I2[178]2[167][153]"SO THERE...":I2[178]0:[137]8920
8890 [139]SC[177]14[175]O1[177]O2[175]I2[178]1[167][153]"WHAT DO YOU THINK OF THAT HEY??":I2[178]2
8900 [139]SC[177]14[175]O1[177]O2[175]I2[178]0[167][153]"I'M GOING TO WHIP YOUR....":I2[178]1
8910 [139]SC[177]14[175]O2[177]O1[167][153]"LOOK OUT I'M CATCHING UP..."
8920 [151]198,0:[146]198,1:[161]G$
8930 [141]8480
8940 [139]TR[178]2[167]6640
8950 :
8960 :
8970 [141]6160
8980 SC[178]0:[141]8480
8990 PP(5)[178]UP:PS(5)[178]US:PV(5)[178]UV
9000 [129]I[178]1[164]5
9010 VP(I)[178]PP(I)
9020 VS(I)[178]PS(I)
9030 VL(I)[178]PV(I)
9040 [130]
9050 [141]2730
9060 [141]450
9070 [141]550
9080 [141]650
9090 [141]840
9100 RN[178]0
9110 [141]5720
9120 [139]RN[178]1[167]9160
9130 [141]5840
9140 [139]RN[178]1[167]9160
9150 [141]5930
9160 [141]4960
9170 [141]5480
9180 [141]5590:O2[178]O2[170]SC
9190 [153][202](DN$,1,22)"WHICH IS WORTH"SC"POINTS
9200 IFSC<6ANDI3=8THENPRINT"GOSH YOU'RE GOOD.":I3=0
9210 IFSC<6ANDI3=7THENPRINT"GOSH A WHOLE"SC"POINTS, I'M SHAKING":I3=8
9220 IFSC<6ANDI3=6THENPRINT"LOOK OUT YOUR ON THE MOVE":I3=7
9230 IFSC<6ANDI3=5THENPRINT"BOY THAT WAS A TOUGH ONE TO COUNT":I3=6
9240 IFSC<6ANDI3=4THENPRINT"I THINK YOU'RE PLAYING SUPERBLY!!":I3=5
9250 IFSC<6ANDI3=3THENPRINT"HOW DO YOU GET SUCH GOOD HANDS?":I3=4
9260 IFSC<6ANDI3=2THENPRINT"I WISH I WAS AS LUCKY AS YOU...":I3=3
9270 IFSC<6ANDI3=1THENPRINT"ALMOST NOT WORTH COUNTING, HEY?":I3=2
9280 IFSC<6ANDI3=0THENPRINT"WOW"SC"POINTS, HOW DID YOU DO IT?":I3=1
9290 IFSC>12ANDO2>O1ANDII=3THENPRINT"YOU LUCKY SON OF A...":II=0:GOTO9330
9300 IFSC>12ANDO2>O1ANDII=2THENPRINT"HOW LUCKY CAN YOU GET???":II=3:GOTO9330
9310 IFSC>12ANDO2>O1ANDII=1THENPRINT"I THINK YOU'RE CHEATING.":II=2:GOTO9330
9320 IFSC>12ANDO2>O1ANDII=0THENPRINT"BEGINERS LUCK!":II=1
9330 IFSC>12ANDO1>O2THENPRINT"I'M NOT WORRIED...YET"
9340 POKE198,0:WAIT198,1:GETG$
9350 GOSUB8480
9360 IFTR=1THEN6640
9370 GOTO8650
9380 :
9390 REM
9400 REM INTSRUCTIONS
9410 REM
9420 PRINT"[147] [213][192][192][192][192][192][192][192][192][192][192][201]"
9430 PRINT" [221] CRIBBAGE [221]"
9440 PRINT" [202][192][192][192][192][192][192][192][192][192][192][203]"
9450 PRINT" THIS COMPUTERIZED GAME OF CRIBBAGE IS"
9460 PRINT" PLAYED THE SAME WAY THAT ORDINARY"
9470 PRINT" CRIBBAGE IS PLAYED EXCEPT FOR ONE"
9480 PRINT" MAJOR DIFFERENCE --- NO POINTS ARE"
9490 PRINT" AWARDED FOR RUNS THAT OCCUR DURING"
9500 PRINT" PEGGING."
9510 PRINT" THE FIRST PERSON (COMPUTER) TO REACH"
9520 PRINT" 121 POINTS WILL BE THE WINNER.
9530 [153]" ** GOOD LUCK **"
9540 [153]"DEFNOTE: CONTTO PLAY OR DISCARD ANY CARD, JUST"
9550 [153]" TYPE IN THE NUMBER UNDER THE CARD."
9560 [153]" <HIT ANY KEY TO START>"
9570 [151]198,0
9580 [146]198,1
9590 [161]G$:[153]"LOAD"
9600 [141]2390:[137]1890
9610 :
9620 :
9630 [143]
9640 [143] CHECK IF CAN PLAY COMP
9650 [143]
9660 :
9670 PI[178]0
9680 [129]I[178]1[164]4
9690 [139]C0(I)[178]0[167]9710
9700 [139]CN[170]CV(I)[179]32[167]PI[178]I:I[178]4
9710 [130]
9720 [142]
9730 CZ[178]0
9740 [129]I[178]4[164]1[169][171]1
9750 [139]CN[170]CV(I)[179]32[175]C0(I)[178]1[167]CZ[178]I:I[178]1
9760 [130]
9770 [142]
9780 :
9790 :
9800 [143]
9810 [143] SID PLAYS FIRST
9820 [143]
9830 :
9840 [141]8480
9850 [141]7090:[141]7470
9860 PB[178]22:[141]8480
9870 [141]7590:[141]7750:[141]8480
9880 [141]7300:[141]7470:[141]8480
9890 [141]7900
9900 [139]PL[178]0[167][141]9950
9910 [141]7590:[141]7750:[141]8480
9920 [141]9630
9930 [139]PI[178]0[167]10040
9940 [137]9880
9950 [143]
9960 [143] PLAYER CAN'T PLAY
9970 [143]
9980 :
9990 [141]9630
10000 [139]PI[178]0[167]8170
10010 [141]7300:[141]7470:[141]8480
10020 [137]9990
10030 :
10040 [143]
10050 [143] COMPUTER CAN'T PLAY
10060 [143]
10070 :
10080 [141]7900
10090 [139]PL[178]0[167]8170
10100 [141]7590:[141]7750:[141]8480
10110 [137]10080
10120 :